package com.jxwifi.cloud.quickcleanserver.presenter;

import com.jxwifi.cloud.quickcleanserver.app.UrlPool;
import com.jxwifi.cloud.quickcleanserver.model.AuzImpl;
import com.jxwifi.cloud.quickcleanserver.view.ContactView;
import com.jxwifi.cloud.quickcleanserver.okhttp.Params;

public class ContactPresenter {

    private AuzImpl mContactTellImpl;

    private ContactView mContactView;

    public ContactPresenter(ContactView mContactView) {
        this.mContactView = mContactView;
        mContactTellImpl = new AuzImpl();
    }

    public void doContactTell() {
        Params params = new Params();
        params.add("emergencyContactTell", mContactView.getTell());
        mContactTellImpl.auzpost(UrlPool.POST_UPDATE_PROFILE, params, new AuzImpl.AuzListener() {
            @Override
            public void AuzSuccess(int code, String data) {
                mContactView.ContactSuccessMsg(code, data);
            }

            @Override
            public void AuzFailure(int errorCode, String msg) {
                mContactView.ContactFailureMsg(errorCode, msg);
            }
        });
    }

}
